package com.ccrfid.rmc6.entity.personnel;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.vividsolutions.jts.geom.Point;
import org.hibernate.annotations.Type;

import javax.persistence.*;
import java.sql.Date;
import java.sql.Timestamp;

@Entity
@Table(name = "v_personnel")
public class PersonnelView {
    private Long id;
    private String personnelName;
    private String nameAcronym;
    private Long cardNumber;
    private String cardSn;
    private String personnelSn;
    private String idNumber;
    private Integer personnelType;
    private String personnelTypeName;
    private Long orgId;
    private String orgName;
    private Integer enabled;
    private Integer gender;
    private Date birthday;
    private String phoneNumber;
    private String shortNumber;
    private Integer onlineStatus;
    private Integer cutoffStatus;
    private Integer lowpowerStatus;
    private Integer heartRate;
    private Integer locatorAddress;
    private Timestamp lastLocateTime;
    private Integer floorNumber;
    private Point pos;
    private String personnelCategory;
    private String hexNumber;

    private String title;


    @Id
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "personnel_name")
    public String getPersonnelName() {
        return personnelName;
    }

    public void setPersonnelName(String personnelName) {
        this.personnelName = personnelName;
    }

    @Basic
    @Column(name = "name_acronym")
    public String getNameAcronym() {
        return nameAcronym;
    }

    public void setNameAcronym(String nameAcronym) {
        this.nameAcronym = nameAcronym;
    }

    @Basic
    @Column(name = "card_number")
    public Long getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(Long cardNumber) {
        this.cardNumber = cardNumber;
    }

    @Basic
    @Column(name = "card_sn")
    public String getCardSn() {
        return cardSn;
    }

    public void setCardSn(String cardSn) {
        this.cardSn = cardSn;
    }

    @Basic
    @Column(name = "personnel_sn")
    public String getPersonnelSn() {
        return personnelSn;
    }

    public void setPersonnelSn(String personnelSn) {
        this.personnelSn = personnelSn;
    }

    @Basic
    @Column(name = "id_number")
    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    @Basic
    @Column(name = "personnel_type")
    public Integer getPersonnelType() {
        return personnelType;
    }

    public void setPersonnelType(Integer personnelType) {
        this.personnelType = personnelType;
    }

    @Basic
    @Column(name = "personnel_type_name")
    public String getPersonnelTypeName() {
        return personnelTypeName;
    }

    public void setPersonnelTypeName(String personnelTypeName) {
        this.personnelTypeName = personnelTypeName;
    }

    @Basic
    @Column(name = "org_id")
    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    @Basic
    @Column(name = "org_name")
    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    @Basic
    @Column(name = "is_enabled")
    public Integer getEnabled() {
        return enabled;
    }

    public void setEnabled(Integer enabled) {
        this.enabled = enabled;
    }

    @Basic
    @Column(name = "gender")
    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    @Basic
    @Column(name = "birthday")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    @Basic
    @Column(name = "phone_number")
    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    @Basic
    @Column(name = "short_number")
    public String getShortNumber() {
        return shortNumber;
    }

    public void setShortNumber(String shortNumber) {
        this.shortNumber = shortNumber;
    }

    @Basic
    @Column(name = "online_status")
    public Integer getOnlineStatus() {
        return onlineStatus;
    }

    public void setOnlineStatus(Integer onlineStatus) {
        this.onlineStatus = onlineStatus;
    }

    @Basic
    @Column(name = "cutoff_status")
    public Integer getCutoffStatus() {
        return cutoffStatus;
    }

    public void setCutoffStatus(Integer cutoffStatus) {
        this.cutoffStatus = cutoffStatus;
    }

    @Basic
    @Column(name = "lowpower_status")
    public Integer getLowpowerStatus() {
        return lowpowerStatus;
    }

    public void setLowpowerStatus(Integer lowpowerStatus) {
        this.lowpowerStatus = lowpowerStatus;
    }

    @Basic
    @Column(name = "heart_rate")
    public Integer getHeartRate() {
        return heartRate;
    }

    public void setHeartRate(Integer heartRate) {
        this.heartRate = heartRate;
    }

    @Basic
    @Column(name = "locator_address")
    public Integer getLocatorAddress() {
        return locatorAddress;
    }

    public void setLocatorAddress(Integer locatorAddress) {
        this.locatorAddress = locatorAddress;
    }

    @Basic
    @Column(name = "last_locate_time")
    public Timestamp getLastLocateTime() {
        return lastLocateTime;
    }

    public void setLastLocateTime(Timestamp lastLocateTime) {
        this.lastLocateTime = lastLocateTime;
    }

    @Basic
    @Column(name = "floor_number", nullable = true)
    public Integer getFloorNumber() {
        return floorNumber;
    }

    public void setFloorNumber(Integer floorNumber) {
        this.floorNumber = floorNumber;
    }

    @Basic
    @Column(name = "pos")
    @Type(type = "jts_geometry")
    public Point getPos() {
        return pos;
    }

    public void setPos(Point pos) {
        this.pos = pos;
    }

    @Basic
    @Column(name = "personnel_category")
    public String getPersonnelCategory() {
        return personnelCategory;
    }

    public void setPersonnelCategory(String personnelCategory) {
        this.personnelCategory = personnelCategory;
    }


    @Basic
    @Column(name = "hex_number")
    public String getHexNumber() {
        return hexNumber;
    }

    public void setHexNumber(String hexNumber) {
        this.hexNumber = hexNumber;
    }

    @Basic
    @Column(name = "title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

}
